PATH![]() |
![]() ![]() |
Allocates a nonrelocatable memory block.
LogicalAddress MPAllocateAligned (
ByteCount size,
UInt8 alignment,
OptionBits options);
The memory referenced by the returned address is guaranteed to be accessible by the application's cooperative task and any preemptive tasks that it creates, but not by other applications or their preemptive tasks. Any existing nonglobal heap blocks are freed when the application terminates. As with all shared memory, you must explicitly synchronize access to allocated heap blocks using a notification mechanism.
You can replicate the effect of the older MPAllocate function by calling MPAllocateAligned with 32-byte alignment and no options.
The function MPFree .